<div class="navbar-item">
    {% if account is None %}
    <a class="button is-primary" href="{{ reverse_url('settings.accounts.login') }}">登录</a>
    {% else %}
    <div class="dropdown is-hoverable is-justify">
        <div class="dropdown-trigger">
            <a class="button is-primary" href="" aria-haspopup="true" aria-controls="dropdown-menu">
                {%if account.user%}
                <span>{{account.user.name}}<small>({{ account.name }})</small></span>
                {%else%}
                <span>{{ account.name }}</span>
                {%end%}
                <span class="icon is-small">
                    <i class="fas fa-angle-down" aria-hidden="true"></i>
                </span>
            </a>
        </div>
        <div class="dropdown-menu" id="dropdown-menu" role="menu">
            <div class="dropdown-content">
                <a href="{{ reverse_url('settings.accounts') }}" class="dropdown-item">切换帐号</a>
            </div>
        </div>
    </div>
    {% end %}
</div>